package com.wang.service;

import com.wang.entity.User;

import javax.jws.WebService;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Classname MyServiceImpl
 * @Description TODO
 * @Date 2024/5/31 11:55
 * @Created by pc
 */
@WebService(name = "MyService", // 暴露服务的名称
        targetNamespace = "http://service.wang.com", // 包名倒序
        endpointInterface = "com.wang.service.MyService"
)
public class MyServiceImpl implements MyService {
    @Override
    public String sayHello(String msg) {
        return "收到的信息是:--->" + msg + ",现在时间是:--->" + new Date();
    }

    @Override
    public List<User> getUsers() {
        List<User> users = new ArrayList<>();
        users.add(new User(1L, "java1412", "北京"));
        users.add(new User(2L, "java1412", "上海"));
        users.add(new User(3L, "java1412", "南京"));
        return users;
    }
}
